package com.slz3.business.module.drawManagement.draIntegralLottery.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.drawManagement.draFreeLottery.domain.DraFreeLotteryCondition;
import com.slz3.business.module.drawManagement.draFreeLottery.steward.DraFreeLotteryResExecutor;
import com.slz3.business.module.drawManagement.draFreeLottery.steward.DraFreeLotteryResSafeValid;
import com.slz3.business.module.drawManagement.draIntegralLottery.domain.DraIntegralLottery;
import com.slz3.business.module.drawManagement.draIntegralLottery.domain.DraIntegralLotteryCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class DraIntegralLotteryResAtomic {

    public Mono<ServerResponse> add_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLottery draIntegralLottery) {
        return DraIntegralLotteryResSafeValid.add(req, draIntegralLottery) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.add(req, draIntegralLottery);
    }

    public Mono<ServerResponse> delete_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.delete(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLottery draIntegralLottery) {
        return DraIntegralLotteryResSafeValid.modify(req, draIntegralLottery) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.modify(req, draIntegralLottery);
    }

    public Mono<ServerResponse> info_$DraIntegralLotteryUpdateLock(ServerRequest req) {
        return DraIntegralLotteryResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.auditSubmit(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.audit(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.auditReject(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.usingEnable(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.usingDisable(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.usingDisable(req);
    }
    public Mono<? extends ServerResponse> lottery_$DraIntegralLotteryUpdateLock(ServerRequest req, DraIntegralLotteryCondition draIntegralLotteryCondition) {
        return DraIntegralLotteryResSafeValid.lottery(req, draIntegralLotteryCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraIntegralLotteryResExecutor.lottery(req);
    }
}
